package engine

import (
	"github.com/gin-gonic/gin"
	"gorm.io/gorm"
)

// Application ...
type Application struct {
	Name      string
	SetupApp  func(string) error
	SetupVars func() error
}

type WEBApplication struct {
	*Application
	CreateTables      func() error
	ServiceImpl       func(*gorm.DB) error
	RegisterHttpRoute func() *gin.Engine
	CronScheduler     func() []*CronJob
}

// CronJob warps job define.
type CronJob struct {
	Name string // Job unique name
	Spec string // Job specification
	Job  func() // Job func
}
